<template>
  <div>
    <h-menu mode="horizontal" theme="dark" active-name="1">
      <div style="display: flex; justify-content: space-between">
        <div>
          <div class="layout-logo" style="display: flex; align-items: center; margin-left: 7vh;margin-top: -1vh;" >
            <img src="../assets/logo2.gif" alt="Logo" style="width: 80px; height: 50px" />
            <h3 style="margin-left: 20px;font-size: larger;">理财销售系统</h3>
          </div>
        </div>
        <h-dropdown>
          <div style="padding-top: 0.7vh; margin-right: 2vh">
            <el-avatar icon="el-icon-user-solid">
              <h-icon name="unfold"></h-icon>
            </el-avatar>
          </div>
          <h-dropdown-menu slot="list">
            <h-dropdown-item>
              <p @click="logout">退出登录</p>
            </h-dropdown-item>
          </h-dropdown-menu>
        </h-dropdown>
      </div>
    </h-menu>
  </div>
</template>

<script>
export default {
  name: "myHeader",
  methods: {
    logout() {
      // 退出登录
      this.$router.push("/");
      this.$store.commit("operator/logout");
    },
  },
};
</script>

<style lang="less" scoped>
.h-menu-horizontal {
  height: 9vh;
}

</style>